package com.thx.dictionary.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thx.common.datasource.DataSource;
import com.thx.common.service.BaseManager;
import com.thx.dictionary.dao.DictionaryDao;
import com.thx.dictionary.model.Dictionary;


@Service
@DataSource("dataSourceB")
@Transactional(readOnly = true)
public class DictionaryManager extends BaseManager<Dictionary> {
	@Autowired
	private DictionaryDao dicnDao;

	public DictionaryDao getDicnDao() {
		return dicnDao;
	}

	public void setDicnDao(DictionaryDao dicnDao) {
		this.dicnDao = dicnDao;
	}

	public List<Dictionary> searchDicName(String dicName) {
		// TODO Auto-generated method stub
		return dicnDao.searchDicName(dicName);
	}
	
	public Dictionary findByDicName(String dicName) {

		return dicnDao.findByDicName(dicName);
	}
	public List<Dictionary> searchByCode(String dicnCode){
		return dicnDao.searchByCode(dicnCode);
	}
	
}
